package com.hist.medical_treatment.controller;

import java.sql.Timestamp;
import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hist.medical_treatment.entity.Register;
import com.hist.medical_treatment.service.RegisterService;

@Controller
public class RegisterController {
         @Autowired
         RegisterService service;
         
         @ResponseBody
         @RequestMapping("/nextRegister")
         public String nextRegister() {
        	 return service.nextRegister();
         }
         @ResponseBody
         @RequestMapping("/getRegisterByCaseNumber")
         public Register getRegisterByCaseNumber(String caseNumber) {
     		// TODO Auto-generated method stub
     		return service.getRegisterByCaseNumber(caseNumber);
     	}
         @ResponseBody
         @RequestMapping("/insertRegister")
         public void insertRegister(Integer id,String caseNumber, String realName, Integer gender, Date birthDate, Integer age,
     			String ageType, Date visitDate, String noon, Integer deptID, Integer userID, Integer registLeID,
     			Integer settleID,Integer registerID) {
     		// TODO Auto-generated method stub
     		service.insertRegister(id,caseNumber, realName, gender, birthDate, age, ageType, visitDate, noon, deptID, userID, registLeID, settleID,registerID);
     	}
         @ResponseBody
         @RequestMapping("/getMaxID")
         public Integer getMaxID() {
     		return service.getMaxID();
     	}
}
